﻿using System.Web.Mvc;
using Reece.Open.Mvc.Common;

namespace Reece.Open.Mvc.Three.Extenders
{
    public static class Menus
    {
        public static TopMenu BeginMenu(this HtmlHelper html, string id, string css = "dropmenu", bool renderInit = false )
        {
            return new TopMenu(html.ViewContext,id,css, renderInit);
        }

        public static MvcHtmlString  FirstMenuItem(this HtmlHelper html, string text, string id, string href = null)
        {
            return new MvcHtmlString(MenuItems.FirstMenuItem(text, id, href));
        }

        public static MvcHtmlString LastMenuItem(this HtmlHelper html, string text, string id, string href = null)
        {
            return new MvcHtmlString(MenuItems.LastMenuItem(text, id, href));
        }

        public static MvcHtmlString MenuItem(this HtmlHelper html, string text, string id, string href = null)
        {
            return new MvcHtmlString(MenuItems.MenuItem(text, id, href));
        }

        public static SubMenu BeginSubMenu(this HtmlHelper html)
        {
            return new SubMenu(html.ViewContext);
        }
    }
}
